<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Student list</title>
</head>
<body>
<form action="/student/list" method="post">
    <label>Name</label>
    <input type="text" name="name">
    <label>Age</label>
    <input type="text" name="age">
    <input type="submit" value="Search">
</form>
<table border="1">
    <tr>
        <td>id</td>
        <td>Name</td>
        <td>Age</td>
        <td>Action</td>
    </tr>
    <tr th:each="student: ${students}">
        <td th:text="${student.id}"></td>
        <td th:text="${student.name}"></td>
        <td th:text="${student.age}"></td>
        <td>
            <a th:href="@{/student/delete/{id}(id=${student.id})}">
                Delete
            </a>
            <a th:href="@{/student/update/{id}(id=${student.id})}">
                Update
            </a>
        </td>
    </tr>
</table>
<div>
    <a href="/student/create">Create</a>
</div>
</body>
</html>